"""
@Time: 2021/1/18 下午 7:35
@Author: jinzhuan
@File: trex_test.py
@Desc: 
"""
import sys
sys.path.append('/data/zhuoran/code/cognlp')
sys.path.append('/data/zhuoran/cognlp')


from cognlp.io.loader.re.trex import TrexRelationLoader
from cognlp.io.processor.re.trex import TrexRelationProcessor

loader = TrexRelationLoader()
data = loader.load_all('../../../../cognlp/data/re/trex/data')
processor = TrexRelationProcessor(label_list=loader.get_labels(), path='../../../../cognlp/data/re/trex/data')
datable = processor.process(data)
datable.save_table('../../../../cognlp/data/re/trex/data/train.json')
print(1)
